package com.useeinfo.oa.modules.inspection.thread.task;

import com.useeinfo.oa.modules.inspection.entity.PlannerInspection;
import com.useeinfo.oa.modules.maintaining.biz.PeriodInstallBiz;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class InsOrderTask implements Runnable {
    private final static Logger logger = LoggerFactory.getLogger(InsOrderTask.class);

    private volatile PeriodInstallBiz periodInstallBiz;

    private PlannerInspection plannerInspection;

    public InsOrderTask(PeriodInstallBiz periodInstallBiz, PlannerInspection plannerInspection) {
        this.periodInstallBiz = periodInstallBiz;
        this.plannerInspection = plannerInspection;
    }

    @Override
    public void run() {
        try {
            periodInstallBiz.executeInsOrder(plannerInspection);
        } catch (Exception e) {
            logger.info("创建工单线程失败");
        }
    }
}
